<script type="text/javascript" src="javascript/ajax/prototype.js"></script>

<link rel="stylesheet" type="text/css" href="modules/IShopStore/pnjavascript/ddtabmenu/ddtabmenufiles/ddcolortabs_blue.css" />
</style>

<script type="text/javascript">
  function validateForm(form) {

    //Check category
    var category = document.getElementById("form_shipment_name_");
    if (category.value == '') {
      alert("Please Enter Shipment name.");
      document.getElementById('error-shipment').innerHTML = " <FONT COLOR=\"#FF0000\">Enter Shipment name.</FONT>";
      category.focus();
      return false;
    }else{
      document.getElementById('error-shipment').innerHTML = "";
    }
    
  }
</script>



<div id="ddtabs" class="ddcolortabs">
  <ul>
    <li><a href="<!--[pnmodurl modname='IShopStore' type='admin' func='page' ctrl='home']-->" rel="ct1"><span>หน้าหลัก</span></a></li>
    <li><a href="<!--[pnmodurl modname='IShopStore' type='admin' func='list' ctrl='shipment']-->" rel="ct1">
    <span>กลับ</span></a></li>
  </ul>
</div>
<div class="ddcolortabsline">&nbsp;</div>
<!-- end tab menu -->


<fieldset>
<h4 class="innodocument-head">เพิ่ม / แก้ไข การจัดส่ง</h4>

<form id='form' class='form' action="<!--[pnmodurl modname='IShopStore' type='adminform' func='submit' ctrl='Shipment']-->" method="post" enctype="multipart/form-data" onsubmit="return validateForm(this)">
<input type="hidden" name="form[id]" value="<!--[$_GET.id]-->" />

<TABLE width='50%' border="0" class="innoadvert-table">
<TR>
  <TD class='td-label'>ชื่อการจัดส่ง</TD>
  <TD>
    <TABLE>
    <TR>
      <TD><input id="form_shipment_name_" type="text" name="form[shipment]" value="<!--[$form.shipment]-->" title="ตั้งชื่อการจัดส่ง" class="required"  /><FONT SIZE="2" COLOR="#FF0000">&nbsp;*</FONT></TD>
      <TD><div id='error-shipment'></div></TD>
    </TR>
    </TABLE>
  </TD>
</TR>
<tr>
  <td class='td-label' >ค่าขนส่ง</td>
  <td class='td-data' >
    <TABLE>
    <TR>
      <TD><input id="form_shipment_price_" type="text" name="form[price]" value="<!--[$form.price]-->" title="ราคาค่าจัดส่ง" class="required"  />&nbsp;บาท<FONT SIZE="2" COLOR="#FF0000">&nbsp;*</FONT></TD>
      <TD><FONT SIZE="2" COLOR="#FF0000"><div id="error-price"></div></FONT></TD>
    </TR>
    </TABLE>
  </td>
</tr>
<tr>
  <td class='td-label' >รายละเอียด</td>
  <td class='td-data' >
    <TABLE>
    <TR>
      <TD>
        <textarea name='form[detail]' rows="4" cols="60"><!--[$form.detail]--></textarea></TD>
      <TD><FONT SIZE="2" COLOR="#FF0000"><div id="error-detail"></div></FONT></TD>
    </TR>
    </TABLE>
  </td>
</tr>
<TR>
  <TD></TD>
  <TD><!--[if $form.id]--><INPUT TYPE="submit" value='Update' name='Update' type="submit" ><!--[/if]-->
      <!--[if $form.id==null]--><INPUT TYPE="submit" value='Submit' name='Submit' type="submit" ><!--[/if]-->&nbsp;&nbsp;
      </TD>
</TR>
</TABLE>

</form>
</fieldset>